import App from './App'

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import uviewPlus from '@/uni_modules/uview-plus'
import mpShare from '@/uni_modules/uview-plus/libs/mixin/mpShare'

uni.$u.config.unit = 'px'


import store from './store'

import { setupMixin } from './mixins'

import { createPinia } from "pinia";

export function createApp() {
	const app = createSSRApp(App)
	const pinia = createPinia()
	//配置
	app.config.globalProperties.$store = store;
	app.config.globalProperties.$url = 'https://study.soft.jx.cn/api/';

	app.use(uviewPlus,store)
	app.mixin(mpShare)
	
	app.use(pinia)
	
	setupMixin(app)
	return {
		app
	}
}
// #endif